﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DaphneTranslatorWPF.Common
{
    public static class ParamKeys
    {
        public static string keyPrimaryCultureCode = "PrimaryCultureCode";
        public static string keyRootPath = "RootPath";
    }

    public class Parameters
    {
        private Dictionary<string, object> _parameters;

        public Parameters()
        {
            _parameters = new Dictionary<string, object>();
        }

        public void SetValue(string sKey, object objValue)
        {
            _parameters[sKey] = objValue;
        }

        public object GetValue(string sKey)
        {
            object objValue;
            _parameters.TryGetValue(sKey, out objValue);
            return objValue;
        }

        public void SetStringValue(string sKey, string sValue)
        {
            SetValue(sKey, sValue);
        }

        public string GetStringValue(string sKey)
        {
            return (string)GetValue(sKey);                
        }

        private static Parameters _defaultInstance = null;

        public static Parameters Default
        {
            get
            {
                if (_defaultInstance == null)
                    _defaultInstance = new Parameters();

                return _defaultInstance;
            }
        }
    }
}
